import play.*;
import play.jobs.*;
import play.test.*;
 
import models.*;

/**
 * This Bootstrap job is run when ever the application is restarted.
 * It populates the database with initial data if there's no data in it.
 * 
 * This helps testing very much...
 *
 */
@OnApplicationStart
public class Bootstrap extends Job {
 
    public void doJob() {
    	Fixtures.deleteDatabase();
        Fixtures.loadModels("../conf/initial-data.yml");
    }
 
}